<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>旋转时钟</title>
    <style>
        body {
            margin: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            /* background-color: #f0f0f0; */
        }

        .clock-container {
            position: relative;
            width: 300px;
            height: 300px;
            border-radius: 50%;
            /* background-color: #fff; */
            /* border: 10px solid #333; */
        }

        .clock-hand {
            position: relative;
            left: 130px;
            top: 35px;
            height: 100px;
            width: 60px;
            /* background-color: #333; */
            background-image: url('.//niuma.jpeg');
            background-size: cover;
            /* 调整图片大小以覆盖整个容器 */
            background-position: center;
            /* 图片居中显示 */
            background-repeat: no-repeat;
            /* 图片不重复 */
            transform-origin: center bottom;
        }

        .point {
            position: absolute;
            margin-top: 20px;
            margin-left: 140px;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: #333;
            text-align: center;
            line-height: 20px;
            font-size: 12px;
            color: white;
        }
    </style>
</head>

<body>
    <div class="clock-container">
        <div class="clock-hand" id="clockHand"></div>
        <!-- 点的示例，可以根据需要添加更多 -->
        <div class="point" style="transform: rotate(90deg) translate(130px);">
            <div style="transform: rotate(-90deg);margin-top:15px;margin-left:0px;">睡觉</div>
        </div>
        <div class="point" style="transform: rotate(120deg) translate(130px);">
            <div style="transform: rotate(-120deg);margin-top:15px;margin-left:0px;">公交</div>
        </div>
        <div class="point" style="transform: rotate(150deg) translate(130px);">
            <div style="transform: rotate(-150deg);margin-top:15px;margin-left:0px;">打卡</div>
        </div>
        <div class="point" style="transform: rotate(180deg) translate(130px);">
            <div style="transform: rotate(-180deg);margin-top:15px;margin-left:0px;">早会</div>
        </div>
        <div class="point" style="transform: rotate(210deg) translate(130px);">
            <div style="transform: rotate(-210deg);margin-top:15px;margin-left:0px;">干活</div>
        </div>
        <div class="point" style="transform: rotate(240deg) translate(130px);">
            <div style="transform: rotate(-240deg);margin-top:15px;margin-left:0px;">午饭</div>
        </div>
        <div class="point" style="transform: rotate(270deg) translate(130px);">
            <div style="transform: rotate(-270deg);margin-top:15px;margin-left:0px;">小憩</div>
        </div>
        <div class="point" style="transform: rotate(300deg) translate(130px);">
            <div style="transform: rotate(-300deg);margin-top:15px;margin-left:0px;">干活</div>
        </div>
        <div class="point" style="transform: rotate(330deg) translate(130px);">
            <div style="transform: rotate(-330deg);margin-top:15px;margin-left:0px;">下班</div>
        </div>
        <div class="point" style="transform: rotate(360deg) translate(130px);">
            <div style="transform: rotate(-360deg);margin-top:15px;margin-left:0px;">晚饭</div>
        </div>
        <div class="point" style="transform: rotate(390deg) translate(130px);">
            <div style="transform: rotate(-390deg);margin-top:15px;margin-left:0px;">加班</div>
        </div>
        <div class="point" style="transform: rotate(420deg) translate(130px);">
            <div style="transform: rotate(-420deg);margin-top:15px;margin-left:0px;">公交</div>
        </div>
        <!-- <div class="point" style="transform: rotate(450deg) translate(130px);">
            <div style="transform: rotate(-450deg);margin-top:15px;margin-left:0px;">睡觉</div>
        </div> -->
        <!-- <div class="point" style="transform: rotate(90deg) translate(130px);">下午工作</div>
        <div class="point" style="transform: rotate(120deg) translate(130px);">下午茶</div>
        <div class="point" style="transform: rotate(150deg) translate(130px);">下班</div>
        <div class="point" style="transform: rotate(180deg) translate(130px);">晚餐</div>
        <div class="point" style="transform: rotate(210deg) translate(130px);">休闲</div>
        <div class="point" style="transform: rotate(240deg) translate(130px);">睡觉</div>
        <div class="point" style="transform: rotate(270deg) translate(130px);">深夜</div>
        <div class="point" style="transform: rotate(300deg) translate(130px);">凌晨</div>
        <div class="point" style="transform: rotate(330deg) translate(130px);">1点</div> -->
    </div>

    <script>
        const clockHand = document.getElementById('clockHand');
        setInterval(() => {
            const now = new Date();
            const seconds = now.getSeconds();
            // const minutes = now.getMinutes();
            // const hours = now.getHours();
            let rotation = ((seconds / 12) * 360);// + ((minutes / 60) * 360) + ((hours / 12 / 12) * 360);
            clockHand.style.transform = `rotate(${rotation}deg)`;
        }, 1000);
    </script>
</body>

</html>